import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);
const store = new Vuex.Store({
	state: {
		isTabShow: true,
		tabChange: 0,
		firstCategoryUpdate: false,
		canHomeResize: false,
	},
	getters: {
		getTabState: state => {
			return state.isTabShow
		},
		getTabChange: state => {
			return state.tabChange
		},
		getCateUpdate: state => {
			return state.firstCategoryUpdate
		},
		getCanHomeResize: state => {
			return state.canHomeResize
		}
	},
	mutations: {
		changeTabState: (state,status) => {
			state.isTabShow = status;
		},
		changeTabChange: (state,val) => {
			state.tabChange = val
		},
		changeCateUpdate: (state,val) => {
			state.firstCategoryUpdate = val
		},
		changeCanHomeResize: (state,val) => {
			state.canHomeResize = val
		}
	}
});

export default store;